package com.bysc.cmsservice.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author kkk
 * @since 2024-05-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="StudyData对象", description="")
public class StudyData implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资料ID")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;
    @ApiModelProperty(value = "父类别id")
    private String parentTypeId;
    @TableField(exist = false)
    private String parentTypeName;
    @ApiModelProperty(value = "类别id")
    private String typeId;
    @TableField(exist = false)
    @ApiModelProperty(value = "子类别名称")
    private String typeName;
    @TableField(exist = false)
    @ApiModelProperty(value = "分数")
    private Double score;
    @ApiModelProperty(value = "资料标题")
    private String title;

    @ApiModelProperty(value = "资料描述")
    private String description;

    @ApiModelProperty(value = "文件的url")
    private String fileUrl;

    @ApiModelProperty(value = "点赞量")
    private Integer likes;
    @ApiModelProperty(value = "浏览量")
    private Integer views;

    @ApiModelProperty(value = "收藏量")
    private Integer collections;

    @ApiModelProperty(value = "是否公开（0-是，1-否）")
    private Boolean isPrivate;

    @ApiModelProperty(value = "是否点赞过（0未点赞、1已点赞）")
    @TableField(exist = false)
    private Boolean isLiked;

    @ApiModelProperty(value = "是否收藏过（0未收藏、1已收藏）")
    @TableField(exist = false)
    private Boolean isCollected;

    @ApiModelProperty(value = "是否删除（0-未删除，1已删除）")
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Boolean isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;



}
